
Use NEXUS_DB

GO
--------------------------------------Insert---------------
CREATE PROC insertProduct_Equipment
	@EquipmentID int,
	@productID int,
	@Amount int
AS
INSERT INTO  [Product-Equipment](EquipmentID,productID,Amount) 
VALUES(@EquipmentID,@productID,@Amount)

GO

---------------------------------------Delete--------------------

CREATE PROC deleteProduct_Equipment
	@EquipmentID int,
	@productID int
AS
	DELETE FROM [Product-Equipment] WHERE EquipmentID=@EquipmentID and productID=@productID
GO
CREATE PROC getProduct_EquipmentByProductID
	@productID int
AS
SELECT     [Product-Equipment].*, Equipment.EquipmentName
FROM         [Product-Equipment] INNER JOIN
                      Equipment ON [Product-Equipment].EquipmentID = Equipment.EquipmentID
Where [Product-Equipment].productID=@productID
GO



